<?php
/* @var $this ContactController */
/* @var $model Contact */

$this->breadcrumbs=array(
	'Contacts'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List Contact', 'url'=>array('index')),
	array('label'=>'Create Contact', 'url'=>array('create')),
);


?>

<h1>Manage Contacts</h1>

<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'contact-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'name',
		'address',
		'email',
		'website',
		'phone',
		'fax',
		'sort',
		   array(
  		'name'=>'enabled',
  		'value'=>'($data->enabled==1)?Yii::t("default", "Có"):Yii::t("default", "Không")'
		),
		array(
  		'name'=>'createddate',
  		'value'=>'date("d-m-Y G:i",$data->createddate)'
		),
		array(
  		'name'=>'modifieddate',
  		'value'=>'date("d-m-Y G:i",$data->modifieddate)'
		),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
